<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Faz.SideWinderSC.Client">

    <Style TargetType="{x:Type local:KeyBox}">
        <Setter Property="Background"
                Value="LightBlue" />
        <Setter Property="MinHeight"
                Value="34" />
        <Setter Property="Padding"
                Value="4" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:KeyBox}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <ItemsControl ItemsSource="{TemplateBinding Keys}">
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <Border CornerRadius="4"
                                            Padding="4"
                                            Margin="2 0 2 0"
                                            BorderThickness="1"
                                            BorderBrush="Gray">
                                        <TextBlock Text="{Binding Path=., StringFormat={}{0}}" />
                                    </Border>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal"
                                                IsItemsHost="True" />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
